GtkIconCache: find_image_offset() return 0 if icon_name is NULL.
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>
Thu, 28 Nov 2013 19:56:11 +0000 (16:56 -0300)
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>
Thu, 28 Nov 2013 19:56:11 +0000 (16:56 -0300)
This avoid a crash calling gtk_about_dialog_set_logo_icon_name() with a NULL icon_name.

gtk/gtkiconcache.c

index 09aaa1b44eb654174c6c49579c1448cfdb3405f0..4eaff97b658521752064a0647aa6829987327efe 100644 (file)
@@ -235,6 +235,9 @@ find_image_offset (GtkIconCache *cache,
   guint32 image_list_offset, n_images;
   int i;
 
+  if (!icon_name)
+    return 0;
+
   chain_offset = cache->last_chain_offset;
   if (chain_offset)
     {